#include <map>
#include <boost/shared_ptr.hpp>

#ifndef _KUAI_FUNC_MAN_HPP_
#define _KUAI_FUNC_MAN_HPP_

namespace kuai {

	template<typename Key, typename Function>
	class FunctionManager
		: public std::map<Key, boost::shared_ptr<Function> > 
	{ 
	public:
		typedef boost::shared_ptr<Function> FunctionPointer;

		const Function* get(const Key& v0) const {
			const_iterator it = find(v0);
			if (it != end()) {
				return it->second.get();
			}
			else {
				return NULL;
			}
		}
	};




}

#endif 